<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        var myJson = {
            "name": "smyhvae",
            "aaa": 111,
            "bbb": 222
        };

        //json遍历的方法：for...in...
        for (var key in myJson) {
            console.log(key); //获取 键
            console.log(myJson[key]); //获取 值（第二种属性绑定和获取值的方法）
            console.log("------");
        }
    </script>
</body>

</html>